﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MapInfo/MapInfo.master" AutoEventWireup="true" StylesheetTheme="Content" CodeFile="DepartmentCarNew.aspx.cs" Inherits="MapInfo_DepartmentCarNew" %>

<%@ Register src="../UserContral/ListPageContral.ascx" tagname="ListPageContral" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table cellspacing="0" cellpadding="0" width="100%"  border="0">
        <tr>
            <td height="25" width="20%" align="Left">
                车辆名称：</td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtCarName" runat="server" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtCarName" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td height="25" width="20%" align="Left">
                数量：</td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtCarCount" runat="server" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtCarCount" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator1" runat="server" 
                    ControlToValidate="txtCarCount" Display="Dynamic" ErrorMessage="请输入数字" 
                    MaximumValue="99999" MinimumValue="0" Type="Integer"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td height="25" width="20%" align="Left">
                牌照ID：</td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtCarID" runat="server" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtCarID" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td height="25" width="20%" align="Left">
                车辆图片：</td>
            <td height="25" width="*" align="left">
                <asp:FileUpload ID="FilePic" runat="server" Width="304px" />
                </asp:TxtBox>
            </td>
        </tr>
        <tr>
            <td height="25" width="20%" align="Left">
                备注：</td>
            <td height="25" width="*" align="left">
                <asp:TextBox ID="txtRemark" runat="server" Width="300px" Height="60px" 
                    TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td height="25" width="20%" align="Left">
                &nbsp;</td>
            <td height="25" width="*" align="left">
                    <asp:Button ID="btnAdd" runat="server" Text="提 交" OnClick="btnAdd_Click"></asp:Button>
                    <asp:Label ID="lblPromt" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td height="25" width="20%" align="Left">
                &nbsp;</td>
            <td height="25" width="*" align="left">
                    &nbsp;</td>
        </tr>
        <tr>
            <td height="25" width="20%" align="Left" colspan="2">
                &nbsp;</td>
        </tr>
        </table>
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tr>
        <td>
    <asp:DataList ID="DltList" RepeatColumns="3" runat="server" RepeatDirection="Horizontal">
        <ItemTemplate>
            <table>
                <tr>
                    <td>
                        <div style="border: solid 1px #CCCCCC; padding: 3px; width: 200px; height: 150px;">
                            <a target="_blank" href='<%# Eval("PicUrl") %>'>
                                <img src='<%# Eval("PicUrl") %>' width="200px" height="150px" /></a>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <%# Eval("CarName")%>
                        <font color="red">[<%# Eval("CarCount") %>辆]</font>
                        <asp:ImageButton ID="BtnDelete" CommandName='<%# Eval("ID") %>'  OnClientClick="return confirm('确定要删除此记录吗？')"
                            ImageUrl="~/Images/delete.gif" runat="server" oncommand="BtnDelete_Command" />
                    </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:DataList>
        </td>
        </tr>
        </table>
    <uc1:ListPageContral ID="ListPageContral1" OnPageSizeChange="ListPageContral1_PageSizeChange" PageSize="6"
        runat="server" />
</asp:Content>

